﻿using System.Collections.Generic;

namespace EyFramework.Library.Select
{
    public partial class CommonSelector : FrmDevSelect
    {
        private IList<GridColumnInfo> _gridColumns;
        private bool _showRowNum = true;
        private bool _alternatingRow = true;
        private object _gridData;

        public CommonSelector(SelectorData selector)
        {
            InitializeComponent();
            this.Text = selector.TitleText;
            this._gridColumns = selector.Columns;
            this._gridData = selector.GridData;
            this._showRowNum = selector.ShowRowNum;
            this._alternatingRow = selector.AlternatingRow;
        }

        protected override void QueryData()
        {
            gcData.DataSource = _gridData;
            DevPublic.SetGridControlView(gvData, _gridColumns, _showRowNum, _alternatingRow);
        }
    }
}